import { createRouter, createWebHistory } from 'vue-router'
import deptview from '@/views/dept/index.vue'
import empView from '@/views/emp/index.vue'
import indexView from '@/views/index/index.vue'
import layoutView from '@/views/layout/index.vue'
import reportEmpView from '@/views/report/emp/index.vue'
import reportStuView from '@/views/report/stu/index.vue'
import loginView from '@/views/login/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    
    {
      path: '/',
      name: '',
      component: layoutView,
      redirect: '/index',
      children:[
          {path: 'index', name: 'index', component: indexView},
          {path: 'dept', name: 'dept', component: deptview},
          {path: 'emp', name: 'emp', component: empView},
          {path: 'empReport', name: 'empReport', component: reportEmpView},
          {path: 'stuReport', name: 'stuReport', component: reportStuView},
      ]
    },
    
    {
      path: '/login',
      name: 'login',
      component: loginView,
    }
   
  ]
})

export default router
